<template>
  <div class="app-container">
    <div>
      <el-row :gutter="20">
        <el-col :span="6" :xs="24">
          <user-card :user="user"/>
        </el-col>
        <el-col :span="18" :xs="24">
          <el-card>
            <el-tabs v-model="activeTab">
              <el-tab-pane label="积分历史" name="routeTimeline">
              </el-tab-pane>
            </el-tabs>
          </el-card>
        </el-col>
      </el-row>
    </div>
  </div>
</template>

<script>
  import DropdownMenu from "@/components/Share/DropdownMenu";
  import UserCard from "./components/UserCard";
  import Timeline from "./components/Timeline";
  import {mapGetters} from "vuex";
  import {} from "./personalInfo.js";
  import {getInfo} from "@/api/user";

  export default {
    name: "Documentation",
    components: {DropdownMenu, UserCard, Timeline,},
    data() {
      return {
        user: {},
        activeTab: 'routeTimeline',
      }
    },
    watch: {},
    created() {
      this.getUserInfo();
    },
    computed: {
      ...mapGetters(["name", "avatar", "roles", "token"]),
    },
    mounted() {
    },
    methods: {
      /*获取当前登录的用户信息*/
      getUserInfo() {
        getInfo(this.token).then(res => {
          if (res.code === 20000) {
            this.user = res.data;
          }
        })
      },
    },
  };
</script>

<style lang="scss" scoped>
  @import "../../styles/common.css";
</style>
